<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ArNetworking: ArNetworking Remote Request API List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ArNetworking
   &#160;<span id="projectnumber">dev20180125</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('RemoteRequestAPI.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">ArNetworking Remote Request API List </div>  </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><ul><li class="level2"><a href="#Receiving">data in a client with ArClientDataReceiver</a></li>
<li class="level2"><a href="#Manual">request methods in ArClientBase</a></li>
</ul>
<li class="level1"><a href="#modes">Robot Control Modes</a><ul><li class="level2"><a href="#stopmode">Stop mode</a></li>
<li class="level2"><a href="#ratiodrivemode">Ratio Drive Mode</a></li>
<li class="level2"><a href="#jogpositionmode">Jog Position Mode</a></li>
<li class="level2"><a href="#wandermode">Wander Mode</a></li>
<li class="level2"><a href="#dockmode">Dock Mode (ARNL only)</a></li>
<li class="level2"><a href="#gotopointmode">Goal Mode (Navigation with ARNL/MOGS only)</a></li>
<li class="level2"><a href="#tourgoalsmode">Tour Goals Mode</a></li>
</ul>
</li>
<li class="level1"><a href="#status">Robot and Server Status Updates</a></li>
<li class="level1"><a href="#strings">General Application-specific Data Set</a></li>
<li class="level1"><a href="#systemstatus">Host OS Status</a></li>
<li class="level1"><a href="#camera">Camera Pan/Tilt/Zoom Controls</a><ul><li class="level2"><a href="#camerarequests">Requests Received</a></li>
<li class="level2"><a href="#camerareplies">Packets Sent</a></li>
</ul>
</li>
<li class="level1"><a href="#config">Application Configuration</a></li>
<li class="level1"><a href="#map">Map Data</a></li>
<li class="level1"><a href="#mapscanning">Control Scanning for Making Maps</a></li>
<li class="level1"><a href="#files">File Upload, Download and Listing</a></li>
<li class="level1"><a href="#commMonitor">Network Communications Monitoring</a></li>
<li class="level1"><a href="#popups">Display Popup Windows in Client</a></li>
<li class="level1"><a href="#drawings">Visualization Graphics</a></li>
<li class="level1"><a href="#customcommands">Custom User Commands</a></li>
<li class="level1"><a href="#auth">Basic User Authentication</a></li>
<li class="level1"><a href="#ARNL">ARNL and MOGS Autonomous Navigation, Go To Goal Commands</a></li>
</ul>
</div>
<div class="textblock"><p>The following is a list of all modes and remote requests provided by various server classes in ArNetworking.</p>
<p>To include a request in an ArNetworking server program, the program must create a server object of the type indicated. See the API documentation for the server object class for details on how it behaves.</p>
<p>Other libraries including ARNL, MOGS, and ArVideo provide additional ArNetworking services. See the API reference documentation for those libraries for more details.</p>
<p>The list below shows the request name, the class in the ArNetworking library that provides that request, and a description of the request and required and optional arguments for the request.</p>
<p>In general, server and client classes can also be used via the Python and Java interfaces, as well as the native C++ library. The ArNetworking Matlab interface provides a smaller set of functions for sending requests and receiving key data from servers such as robot state updates.</p>
<p>For a client to communicate with a server, it must create an <a class="el" href="classArClientBase.html" title="The base client class. ">ArClientBase</a> instance, and connect it to the server. Using <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArArgumentParser.html">ArArgumentParser</a> and ArSimpleClientConnector, the server address, port and other information about connecting to the server may be given as command line options.</p>
<p>For example, in C++:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;Aria.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="ArNetworking_8h.html">ArNetworking.h</a>&quot;</span></div><div class="line">  </div><div class="line"><span class="keywordtype">int</span> <a class="code" href="changeMapOnServer_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div><div class="line">{</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#ad99c16b5d947229d9f8e1c5b2d4cdd73">Aria::init</a>();</div><div class="line">  <a class="code" href="classArClientBase.html">ArClientBase</a> <a class="code" href="changeMapOnServer_8cpp.html#afe594bfb305907ae82f259409cc214cb">client</a>;</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArArgumentParser.html">ArArgumentParser</a> argParser(&amp;argc, argv);</div><div class="line">  <a class="code" href="classArClientSimpleConnector.html">ArClientSimpleConnector</a> clientConnector(&amp;argParser);</div><div class="line"></div><div class="line">  argParser.loadDefaultArguments();</div><div class="line">  <span class="keywordflow">if</span>(!<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#a1b090c01d88bb420b8cf8e0384d25ee1">Aria::parseArgs</a>())</div><div class="line">  {</div><div class="line">    <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#a10d71f3d4d0cf7f38c58a1f749f64a42">Aria::logOptions</a>();</div><div class="line">    <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#a6abc3d39b3e9548063bb8e78375acc17">Aria::exit</a>(1);</div><div class="line">  }</div><div class="line"></div><div class="line">  <span class="keywordflow">if</span>(!clientConnector.connectClient(&amp;client))</div><div class="line">  {</div><div class="line">    <span class="keywordflow">if</span> (client.<a class="code" href="classArClientBase.html#ac8c0a3fa78872df34204b9a1aca53ddd">wasRejected</a>())</div><div class="line">      printf(<span class="stringliteral">&quot;Server &#39;%s&#39; rejected connection, exiting\n&quot;</span>, client.<a class="code" href="classArClientBase.html#a1c10f8408523e85a6d891d0331fa6259">getHost</a>());</div><div class="line">    <span class="keywordflow">else</span></div><div class="line">      printf(<span class="stringliteral">&quot;Could not connect to server &#39;%s&#39;, exiting\n&quot;</span>, client.<a class="code" href="classArClientBase.html#a1c10f8408523e85a6d891d0331fa6259">getHost</a>());</div><div class="line">    <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#a6abc3d39b3e9548063bb8e78375acc17">Aria::exit</a>(1);</div><div class="line">  } </div><div class="line"></div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;Connected to server.&quot;</span>);</div><div class="line"></div><div class="line">  client.<a class="code" href="classArClientBase.html#a012118e5e43ee6e75f9d56ad5fbf2b7b">run</a>();</div><div class="line">}</div></div><!-- fragment --><p>Or, in Python: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;import AriaPy</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="keyword">import</span> sys</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#ad99c16b5d947229d9f8e1c5b2d4cdd73">Aria.init</a>()</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;client = <a class="code" href="classArClientBase.html">ArClientBase</a>()</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;argParser = <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArArgumentParser.html">ArArgumentParser</a>(sys.argv)</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;clientConnector = <a class="code" href="classArClientSimpleConnector.html">ArClientSimpleConnector</a>(argParser)</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;argParser.loadDefaultArguments()</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keywordflow">if</span> <span class="keywordflow">not</span> <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#a1b090c01d88bb420b8cf8e0384d25ee1">Aria.parseArgs</a>():</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#a10d71f3d4d0cf7f38c58a1f749f64a42">Aria.logOptions</a>();</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#a6abc3d39b3e9548063bb8e78375acc17">Aria.exit</a>(1);</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keywordflow">if</span> <span class="keywordflow">not</span> clientConnector.connectClient(client):</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;  <span class="keywordflow">print</span> <span class="stringliteral">&#39;Could not connect to server %s, exiting&#39;</span> % (client.getHost())</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classAria.html#a6abc3d39b3e9548063bb8e78375acc17">Aria.exit</a>(1);</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog.log</a>(ArLog.Normal, <span class="stringliteral">&#39;Connected to server.&#39;</span>)</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;client.run()</div></div><!-- fragment --><p>To run the above programs, connecting to a server with address 10.0.126.32, and the default ArNetworking port 7272, use the following command line arguments:</p>
<div class="fragment"><div class="line">-serverHost 10.0.126.32</div></div><!-- fragment --><p>Run with <code>-help</code> to see a full list of command line arguments.</p>
<p>To request data from the server, and automatically receive and handle simple replies (containing one data field or an array of data fields of the same type), you can use <a class="el" href="classArClientDataReceiver.html" title="A client program may use this to receive responses to data requests and pass the received data to a p...">ArClientDataReceiver</a>. See some examples below, or the documentation for <a class="el" href="classArClientDataReceiver.html" title="A client program may use this to receive responses to data requests and pass the received data to a p...">ArClientDataReceiver</a>, for details.</p>
<p>Alternatively, you can use the request methods in <a class="el" href="classArClientBase.html" title="The base client class. ">ArClientBase</a> to just send requests. This can be used when there will be no replies from the server, or if you are going to use your own packet parser callback (e.g. for replies with more complex field structures.)</p>
<p>To use <a class="el" href="classArClientDataReceiver.html" title="A client program may use this to receive responses to data requests and pass the received data to a p...">ArClientDataReceiver</a> to request data and call a function you provide:</p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyHandlerClass </div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line">  <span class="keywordtype">void</span> doSomething(<span class="keywordtype">int</span> value) </div><div class="line">  {</div><div class="line">    <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;Got a value %d from server&quot;</span>, value);</div><div class="line">  }</div><div class="line">};</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> <a class="code" href="changeMapOnServer_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div><div class="line">{</div><div class="line">   <span class="comment">//...</span></div><div class="line">   <a class="code" href="classArClientBase.html">ArClientBase</a> <a class="code" href="changeMapOnServer_8cpp.html#afe594bfb305907ae82f259409cc214cb">client</a>;</div><div class="line">   <span class="comment">//...connect client to server...</span></div><div class="line"></div><div class="line">   MyHandlerClass handler;</div><div class="line">   <a class="code" href="classArClientDataReceiver.html">ArClientDataReceiver&lt;MyHandlerClass, int&gt;</a> receiver(&amp;client, <span class="stringliteral">&quot;test_pub&quot;</span>, &amp;handler, &amp;MyHandlerClass::doSomething, 200);</div><div class="line"></div><div class="line">  <span class="comment">//...</span></div><div class="line">}</div></div><!-- fragment --><p>In the above example, MyHandlerClass is an example of a class that contains a method <code>doSomething</code>, which will be the end receiver of the integer values received from the server. It will be called by the <a class="el" href="classArClientDataReceiver.html" title="A client program may use this to receive responses to data requests and pass the received data to a p...">ArClientDataReceiver</a> object <code>receiver</code> whenever it receives a reply to the requests from the server. You can use any method on any object of any class to receive the values, if it can take an argument of the required type &ndash; just specify the type of the class and argument in the <a class="el" href="classArClientDataReceiver.html" title="A client program may use this to receive responses to data requests and pass the received data to a p...">ArClientDataReceiver</a> template parameters, and provide the pointer to the object and pointer to the method in the constructor arguments. The first argument to the <a class="el" href="classArClientDataReceiver.html" title="A client program may use this to receive responses to data requests and pass the received data to a p...">ArClientDataReceiver</a> constructor is a pointer to your <a class="el" href="classArClientBase.html" title="The base client class. ">ArClientBase</a> object. The second argument in the same of the request on the server. In this example, the third and fourth arguments are pointers to the target object and method to call &ndash; other variants are available for global functions, pointer to variables, or none (to store the value locally). The last argument is the desired request interval.</p>
<p>To just send a request once (with no arguments), use <a class="el" href="classArClientBase.html#a2dcd11daf8d2045d460b83733e6932d0" title="Request some data (or send a command) just once. ">ArClientBase::requestOnce()</a>. In C++:</p>
<div class="fragment"><div class="line">client.<a class="code" href="classArClientBase.html#a2dcd11daf8d2045d460b83733e6932d0">requestOnce</a>(<span class="stringliteral">&quot;stop&quot;</span>);</div></div><!-- fragment --><p>Similarly, in Python:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;client.requestOnce(<span class="stringliteral">&#39;stop&#39;</span>)</div></div><!-- fragment --><p>To send continuous requests, use <a class="el" href="classArClientBase.html#a0a36a40fe2598eb214368ae8c3a26ca1" title="Request some data every mSec milliseconds. ">ArClientBase::request()</a>. For example, to request "updateNumbers" from <a class="el" href="classArServerInfoRobot.html" title="Server component providing basic robot status information to clients. ">ArServerInfoRobot</a> every 250 ms:</p>
<p>C++:</p>
<div class="fragment"><div class="line">client.<a class="code" href="classArClientBase.html#a0a36a40fe2598eb214368ae8c3a26ca1">request</a>(<span class="stringliteral">&quot;updateNumbers&quot;</span>, 250);</div></div><!-- fragment --><p>Similarly in Python:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;client.request(<span class="stringliteral">&#39;updateNumbers&#39;</span>, 250)</div></div><!-- fragment --><p>To send a request once with one argument, use <a class="el" href="classArClientBase.html#ad70a1f142b30a08ab54a02146a4c2005" title="Request some data or send a command once with a 16-bit (2-byte) integer value as an argument...">ArClientBase::requestOnceWithInt16()</a>, <a class="el" href="classArClientBase.html#a539a9fd371bade04042cf48191afd674" title="Request some data or send a command once with a 32-bit (4-byte) integer value as an argument...">ArClientBase::requestOnceWithInt32()</a>, <a class="el" href="classArClientBase.html#a3b3783c386707050eb83287cb53dd07b" title="Request some data or send a command once with a string as argument. ">ArClientBase::requestOnceWithString()</a>, or <a class="el" href="classArClientBase.html#a972cebefaa57d709158b5b0d2c459d0f" title="Request some data or send a command once with a double value as an argument. ">ArClientBase::requestOnceWithDouble()</a>. For example:</p>
<p>C++: </p><div class="fragment"><div class="line">client.<a class="code" href="classArClientBase.html#a972cebefaa57d709158b5b0d2c459d0f">requestOnceWithDouble</a>(<span class="stringliteral">&quot;turnToHeading&quot;</span>, -90.0);</div></div><!-- fragment --><p>Python: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;client.requestOnceWithDouble(<span class="stringliteral">&#39;turnToHeading&#39;</span>, -90.0)</div></div><!-- fragment --><p>C++: </p><div class="fragment"><div class="line">client.<a class="code" href="classArClientBase.html#a3b3783c386707050eb83287cb53dd07b">requestOnceWithString</a>(<span class="stringliteral">&quot;gotoGoal&quot;</span>, <span class="stringliteral">&quot;Goal 5&quot;</span>);</div></div><!-- fragment --><p>python: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;client.requestOnceWithString(<span class="stringliteral">&#39;gotoGoal&#39;</span>, <span class="stringliteral">&#39;Goal 5&#39;</span>)</div></div><!-- fragment --><p>And similar for integers (either 16-bit/2-byte integers, or 32-bit/4-byte integers.)</p>
<p>To include multiple argument fields with a request, you must construct an <a class="el" href="classArNetPacket.html" title="our packet for the network stuff ">ArNetPacket</a> object, placing fields into it in order for the arguments. For example:</p>
<p>C++: </p><div class="fragment"><div class="line"><a class="code" href="classArNetPacket.html">ArNetPacket</a> p;</div><div class="line">p.<a class="code" href="classArNetPacket.html#a7b9f461cb78f9bcc0ffa30d31784fa8e">doubleToBuf</a>(100.0);</div><div class="line">p.<a class="code" href="classArNetPacket.html#a7b9f461cb78f9bcc0ffa30d31784fa8e">doubleToBuf</a>(60.0);</div><div class="line">p.<a class="code" href="classArNetPacket.html#a7b9f461cb78f9bcc0ffa30d31784fa8e">doubleToBuf</a>(100.0);</div><div class="line">p.<a class="code" href="classArNetPacket.html#a7b9f461cb78f9bcc0ffa30d31784fa8e">doubleToBuf</a>(0.0);</div><div class="line">client.<a class="code" href="classArClientBase.html#a2dcd11daf8d2045d460b83733e6932d0">requestOnce</a>(<span class="stringliteral">&quot;ratioDrive&quot;</span>, &amp;p);</div></div><!-- fragment --><p>Python: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;p = <a class="code" href="classArNetPacket.html">ArNetPacket</a>()</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;p.doubleToBuf(100.0)</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;p.doubleToBuf(60.0)</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;p.doubleToBuf(100.0)</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;p.doubleToBuf(0.0)</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;client.requestOnce(<span class="stringliteral">&#39;ratioDrive&#39;</span>, p)</div></div><!-- fragment --><p>If a server does not provide a given request, then it will be ignored (possibly with a warning logged). You can view a list of requests accepted by a server by running the example clientCommandLister (see <a class="el" href="clientCommandLister_8cpp.html">clientCommandLister.cpp</a>).</p>
<p>You can send requests from your program's main loop, from a callback added to ArNetworking's processing cycle via <a class="el" href="classArClientBase.html#a927e8816c53d7c3c0244cf1d8ad6f68b" title="Adds a functor to call every cycle. ">ArClientBase::addCycleCallback()</a>, from an <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArRobot.html">ArRobot</a> task callback, or from a separate thread (e.g. using ArAsyncTask). Make sure to lock objects that share data with different threads while accessing them. (Refer to class documentation for information on locking or multi-thread use.)</p>
<p>The ArNetworking Matlab interface also provides functions for sending simple requests (with number and string values.)</p>
<p>Some requests send reply packets. To receive these replies in your client, add a handler callback to the <a class="el" href="classArClientBase.html" title="The base client class. ">ArClientBase</a> object using <a class="el" href="classArClientBase.html#af75610dd7e91d98097de1b252d0bacd5" title="Adds a callback functor for data packets received from the server. ">ArClientBase::addHandler()</a>:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;Aria.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="ArNetworking_8h.html">ArNetworking.h</a>&quot;</span></div><div class="line"></div><div class="line"><span class="keyword">class </span>ExampleDataHandler</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line">  ExampleDataHandler(<a class="code" href="classArClientBase.html">ArClientBase</a> *client);</div><div class="line"><span class="keyword">private</span>:</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor1C.html">ArFunctor1C&lt;ExampleDataHandler, ArNetPacket *&gt;</a> handlerCB;</div><div class="line">  <span class="keywordtype">void</span> handleData(<a class="code" href="classArNetPacket.html">ArNetPacket</a> *pkt);</div><div class="line">};</div><div class="line"></div><div class="line"><span class="comment">/* The handler method. 32-bit integer values are removed from the packet using </span></div><div class="line"><span class="comment">   bufToByte4(). Other sizes and types can be removed using similar methods of </span></div><div class="line"><span class="comment">   ArBasePacket. We assume that the server added a 32-bit integer, then</span></div><div class="line"><span class="comment">   added a floating point value by converting it to an integer value for </span></div><div class="line"><span class="comment">   transmission by multiplying it by 10^4.</span></div><div class="line"><span class="comment">*/</span></div><div class="line"><span class="keywordtype">void</span> ExampleDataHandler::handleData(<a class="code" href="classArNetPacket.html">ArNetPacket</a> *pkt)</div><div class="line">{</div><div class="line">  <span class="keywordtype">int</span> intval = (int) pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a80571dd0c49cfb0717b1fc1e81176672">bufToByte4</a>();</div><div class="line">  <span class="keywordtype">double</span> doubleval = ( (double)(pkt-&gt;<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArBasePacket.html#a80571dd0c49cfb0717b1fc1e81176672">bufToByte4</a>()) / 10e4);</div><div class="line">  <a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log</a>(<a class="codeRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a7040faf60eeb155eaa85d439b1066ca1">ArLog::Normal</a>, <span class="stringliteral">&quot;ExampleDataHandler: Received int=%d, double=%f&quot;</span>, intval, doubleval);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// Register this handler method with the client using an ArFunctor object, and</span></div><div class="line"><span class="comment">// request the data from the server once per second:</span></div><div class="line">ExampleDataHandler::ExampleDataHandler(<a class="code" href="classArClientBase.html">ArClientBase</a> *client):</div><div class="line">  handlerCB(this, &amp;ExampleDataHandler::handleData)</div><div class="line">{</div><div class="line">  client-&gt;<a class="code" href="classArClientBase.html#af75610dd7e91d98097de1b252d0bacd5">addHandler</a>(&amp;handlerCB);</div><div class="line">  client-&gt;<a class="code" href="classArClientBase.html#a0a36a40fe2598eb214368ae8c3a26ca1">request</a>(<span class="stringliteral">&quot;exampleRequest&quot;</span>, 1000);</div><div class="line">}</div></div><!-- fragment --><p>See <a class="el" href="classArClientBase.html" title="The base client class. ">ArClientBase</a> for more information on using it in a client program.</p>
<h1><a class="anchor" id="modes"></a>
Robot Control Modes</h1>
<h2><a class="anchor" id="stopmode"></a>
Stop mode</h2>
<table class="doxtable">
<tr>
<th>Mode Name:</th><td>Stop</td></tr>
</table>
<p>This mode is implemented on a server by creating an <a class="el" href="classArServerModeStop.html">ArServerModeStop</a> object.</p>
<table class="doxtable">
<tr>
<th>Request  </th><th>Arguments  </th><th>Description   </th></tr>
<tr>
<td>stop   </td><td>No arguments.  </td><td>Stop the robot and enter stop mode.   </td></tr>
</table>
<h2><a class="anchor" id="ratiodrivemode"></a>
Ratio Drive Mode</h2>
<table class="doxtable">
<tr>
<th>Mode Name: </th><td>Normal Mode:</td><td>Drive </td><td>Unsafe Drive Mode:</td><td>UNSAFE Drive </td></tr>
</table>
<p>This mode is implemented on a server by creating an <a class="el" href="classArServerModeRatioDrive.html">ArServerModeRatioDrive</a> object.</p>
<p>Clients may use the <a class="el" href="classArClientRatioDrive.html" title="Send continuous &quot;ratio drive&quot; requests to server, which spcifies robot velocities relative to user-co...">ArClientRatioDrive</a> utility to send requests, if desired.</p>
<table class="doxtable">
<tr>
<th>Request  </th><th>Arguments  </th><th>Description   </th></tr>
<tr>
<td>ratioDrive  </td><td>double: translation amount (0.0,100.0); double: rotation amount (0.0,100.0); double: throttle (0.0,100.0); [optional: double: lateral velocity amount (0.0,100.0)] </td><td>Drive robot at given percentages of maximum configured velocities (via server's <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArConfig.html">ArConfig</a>)   </td></tr>
<tr>
<td>setSafeDrive </td><td>byte: safe drive state </td><td>Set whether to limit robot motion based on sensing, map, etc. Provide state 1 to enable, 0 to disable. </td></tr>
<tr>
<td>getSafeDrive </td><td>none </td><td>Reply with getSafeDrive packet containing: byte: safe drive state (1 means enabled, 0 means disabled).  </td></tr>
</table>
<h2><a class="anchor" id="jogpositionmode"></a>
Jog Position Mode</h2>
<table class="doxtable">
<tr>
<th>Mode Name:</th><td>Jog</td></tr>
</table>
<p>This mode is implemented on a server by creating an <a class="el" href="classArServerModeJogPosition.html" title="Mode that allows clients to request simple discrete motions of the robot. ">ArServerModeJogPosition</a> object.</p>
<table class="doxtable">
<tr>
<th>Request </th><th>Arguments </th><th>Description  </th></tr>
<tr>
<td>moveDistance </td><td>double: Distance in mm  </td><td>Move forward or backward by the specified distance (milimeters), then stop.  </td></tr>
<tr>
<td>turnByAngle </td><td>double: Angle in deg  </td><td>Rotate the given number of degrees relative to current heading.  </td></tr>
<tr>
<td>turnToHeading </td><td>double: Heading in deg  </td><td>Rotate to the given heading (absolute)  </td></tr>
</table>
<p>This mode will become active if any of the above requests are received. any active robot motion will be stopped once the mode becomes active, and also upon deactivation before switching to a new mode. Each moveDistance request interrupts any previous moveDistance request if still active. Each turnByAngle or turnToHeading interrupts any previous turnByAngle or turnToHeading if still active. For continuous velocity control, see <a class="el" href="classArServerModeRatioDrive.html">ArServerModeRatioDrive</a> instead. Motion will be limited based on obstacles sensed. Clearences may be configured in configuration (<a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArConfig.html">ArConfig</a>) if addToConfig() is called to associate with an <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArConfig.html">ArConfig</a> object. (E.g. <code>motionMode.addToConfig(Aria::getConfig())</code>).</p>
<h2><a class="anchor" id="wandermode"></a>
Wander Mode</h2>
<table class="doxtable">
<tr>
<th>Mode Name:</th><td>Wander</td></tr>
</table>
<p>This mode is implemented on a server by creating an <a class="el" href="classArServerModeWander.html">ArServerModeWander</a> object.</p>
<table class="doxtable">
<tr>
<th>Request  </th><th>Arguments  </th><th>Description   </th></tr>
<tr>
<td>wander  </td><td>no arguments  </td><td>Enter wander mode. Begin randomly wandering.   </td></tr>
</table>
<p>For example: </p><div class="fragment"><div class="line">client.<a class="code" href="classArClientBase.html#a2dcd11daf8d2045d460b83733e6932d0">requestOnce</a>(<span class="stringliteral">&quot;wander&quot;</span>);</div></div><!-- fragment --><h2><a class="anchor" id="dockmode"></a>
Dock Mode (ARNL only)</h2>
<table class="doxtable">
<tr>
<th>Mode Name:</th><td>Dock</td></tr>
</table>
<p>This mode is implemented in ARNL only, by ArServerModeDock.</p>
<p>When commanded to dock, ARNL is used to navigate the robot to an automatic recharging station (aka docking station or dock), and attach to the docking station.</p>
<table class="doxtable">
<tr>
<th>Request </th><th>Arguments </th><th>Description  </th></tr>
<tr>
<td>dock </td><td>none </td><td>Enter dock mode and send the robot to the docking station, according to how it was configured (configure using MobileEyes). </td></tr>
</table>
<p>For example: </p><div class="fragment"><div class="line">client.<a class="code" href="classArClientBase.html#a2dcd11daf8d2045d460b83733e6932d0">requestOnce</a>(<span class="stringliteral">&quot;dock&quot;</span>);</div></div><!-- fragment --><h2><a class="anchor" id="gotopointmode"></a>
Goal Mode (Navigation with ARNL/MOGS only)</h2>
<table class="doxtable">
<tr>
<th>Mode Name: </th><th>Normal Status Value </th><th>Success Status  </th></tr>
<tr>
<td>Goto goal </td><td>Going to <em>goalname</em> </td><td>Arrived at <em>goalname</em>  </td></tr>
<tr>
<td>Goto point </td><td>Going to point </td><td>Arrived at point  </td></tr>
<tr>
<td>Go home </td><td>Returning home </td><td>Returned home </td></tr>
</table>
<p>All status values indicating an error or failure begin with the word "Failed". Possible status strings indicating failure include (but are not limited to): </p><ul>
<li>
Robot lost </li>
<li>
Failed driving because map empty </li>
<li>
Failure to find a suitible path within the map: <ul>
<li>
Failed to plan to <em>goalname</em> </li>
<li>
Failed to plan to point </li>
</ul>
</li>
<li>
Failures due to inability to move the robot or sucessfully navigate on planned path because of timeout, obstructions or other problems: <ul>
<li>
Failed to get home </li>
<li>
Failed to get home because robot lost </li>
<li>
Failed to get to <em>goalname</em> </li>
<li>
Failed to get to <em>goalname</em> because robot lost </li>
<li>
Failed to get to point </li>
<li>
Failed to get to point because robot lost </li>
</ul>
</li>
</ul>
<p>Check log output for more details on errors.</p>
<p>For more details on autonomous navigation and localization with ARNL or MOGS, see the BaseArnl, ARNL and MOGS reference manuals:</p>
<ul>
<li>
If installed here, go to: <ul>
<li>
<a href="../../../Arnl/docs/BaseArnl-Reference/index.html">BaseArnl API Reference</a> </li>
<li>
<a href="../../../Arnl/docs/ARNL-Reference/index.html">ARNL API Reference</a> </li>
<li>
<a href="../../../Arnl/docs/MOGS-Reference/index.html">MOGS API Reference</a> </li>
</ul>
</li>
<li>
To download, visit <a href="http://robots.mobilerobots.com/wiki/ARNL">http://robots.mobilerobots.com/wiki/ARNL</a> </li>
</ul>
<h2><a class="anchor" id="tourgoalsmode"></a>
Tour Goals Mode</h2>
<table class="doxtable">
<tr>
<th>Mode Name: </th><th>Normal Status Value  </th></tr>
<tr>
<td>Touring goals </td><td>Touring to <em>goalnname</em>  </td></tr>
</table>
<p>All status values indicating an error or failure begin with the word "Failed". Possible status strings indicating failure include (but are not limited to): </p><ul>
<li>
Failed touring goals: All goals failed </li>
<li>
Failed touring because robot lost </li>
</ul>
<p>For more details on autonomous navigation and localization with ARNL or MOGS, see the BaseArnl, ARNL and MOGS reference manuals:</p>
<ul>
<li>
If installed here, go to: <ul>
<li>
<a href="../../../Arnl/docs/BaseArnl-Reference/index.html">BaseArnl API Reference</a> </li>
<li>
<a href="../../../Arnl/docs/ARNL-Reference/index.html">ARNL API Reference</a> </li>
<li>
<a href="../../../Arnl/docs/MOGS-Reference/index.html">MOGS API Reference</a> </li>
</ul>
</li>
<li>
To download, visit <a href="http://robots.mobilerobots.com/wiki/ARNL">http://robots.mobilerobots.com/wiki/ARNL</a> </li>
</ul>
<h1><a class="anchor" id="status"></a>
Robot and Server Status Updates</h1>
<p>Clients can use the <a class="el" href="classArClientHandlerRobotUpdate.html" title="Receives robot &quot;update&quot; responses from server and stores them. ">ArClientHandlerRobotUpdate</a> to receive and store updates of the server mode, status and essential robot telemetry information. Functions to recevie updates are also available in the ArNetworking Matlab interface. Use this to monitor the server mode and status, and to get the most recent robot position and other data. See <a class="el" href="classArClientHandlerRobotUpdate.html" title="Receives robot &quot;update&quot; responses from server and stores them. ">ArClientHandlerRobotUpdate</a> and <a class="el" href="robotUpdateExample_8cpp.html">robotUpdateExample.cpp</a> for more details and example code.</p>
<p>This service is provided on the serve by an <a class="el" href="classArServerInfoRobot.html" title="Server component providing basic robot status information to clients. ">ArServerInfoRobot</a> object.</p>
<table class="doxtable">
<tr>
<th>Request </th><th>Arguments </th><th>Description </th><th>Reply packet </th><th>Client Interface Class </th><th><p class="starttd">Server Class </p>
<p class="endtd"></p>
</th></tr>
<tr>
<td>updateStrings </td><td>none </td><td>Request robot status updates. </td><td>string: server status; string: server mode; string: extended status string </td><td><a class="el" href="classArClientHandlerRobotUpdate.html" title="Receives robot &quot;update&quot; responses from server and stores them. ">ArClientHandlerRobotUpdate</a> </td><td><p class="starttd"><a class="el" href="classArServerInfoRobot.html" title="Server component providing basic robot status information to clients. ">ArServerInfoRobot</a> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td>updateNumbers </td><td>none </td><td>Request robot status updates. </td><td>byte2: battery voltage (decivolts) or state of charge (see batteryInfo); byte4: x position; byte4: y position; byte2: theta; byte2: translation velocity; byte2: rotational velocity; byte2: lateral velocity; byte: temperature (or -128 for no data) </td><td><a class="el" href="classArClientHandlerRobotUpdate.html" title="Receives robot &quot;update&quot; responses from server and stores them. ">ArClientHandlerRobotUpdate</a> </td><td><p class="starttd"><a class="el" href="classArServerInfoRobot.html" title="Server component providing basic robot status information to clients. ">ArServerInfoRobot</a> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td>batteryInfo </td><td>none </td><td>Get battery/charge information </td><td>double: low battery threshold voltage; double: shutdown battery voltage threshold; ubyte: battery type (1 if indicates state of charge, 0 if it indicates voltage)</td><td><a class="el" href="classArClientHandlerRobotUpdate.html" title="Receives robot &quot;update&quot; responses from server and stores them. ">ArClientHandlerRobotUpdate</a> </td><td><p class="starttd"><a class="el" href="classArServerInfoRobot.html" title="Server component providing basic robot status information to clients. ">ArServerInfoRobot</a> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td>physicalInfo </td><td>none </td><td>Get information about robot type etc. </td><td>string: robot model type; string: robot model subtype; byte2: robot width (mm); byte2: distance from robot center to front (mm); byte2: distance from robot center to rear (mm); byte: has lateral velocity </td><td><a class="el" href="classArClientHandlerRobotUpdate.html" title="Receives robot &quot;update&quot; responses from server and stores them. ">ArClientHandlerRobotUpdate</a> </td><td><p class="starttd"><a class="el" href="classArServerInfoRobot.html" title="Server component providing basic robot status information to clients. ">ArServerInfoRobot</a> </p>
<p class="endtd"></p>
</td></tr>
</table>
<h1><a class="anchor" id="strings"></a>
General Application-specific Data Set</h1>
<p>A server can provide a general set of regularly updated text fields using <a class="el" href="classArServerInfoStrings.html" title="This will set up strings to send to MobileEyes so that server developers can easily add more informat...">ArServerInfoStrings</a> which can be displayed to users in a table. All item values in this set of data are ascii text strings. This is usually used for server and application statistics and diagnostic data.</p>
<table class="doxtable">
<tr>
<th>Request </th><th>Arguments </th><th>Description </th><th>Reply packet  </th></tr>
<tr>
<td>getStringsInfo </td><td>none </td><td>Get list of items in the data set.  </td><td>ubyte2: number of items; list of items: {string: name; ubyte2: suggested maximum field width to use in display}  </td></tr>
<tr>
<td>getStrings </td><td>none </td><td>Get data. Request this at a regular rate. The reply is a list of strings. Use getStringsInfo to get matching list of labels. </td><td>list: {string: value}  </td></tr>
</table>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArServerInfoStrings.html" title="This will set up strings to send to MobileEyes so that server developers can easily add more informat...">ArServerInfoStrings</a></dd></dl>
<h1><a class="anchor" id="systemstatus"></a>
Host OS Status</h1>
<p>Request diagnostic information about the server host operating system</p>
<table class="doxtable">
<tr>
<th>Request </th><th>Arguments </th><th>Description </th><th>Reply packet  </th></tr>
<tr>
<td>mtxWirelessInfo </td><td>none </td><td>Network information </td><td>string: ip address; byte4: wireless link status (0 disconnected, &gt;0 for ok); byte4: wireless link signal quality level  </td></tr>
</table>
<dl class="section see"><dt>See also</dt><dd>ArServerInfoSystemStatus</dd></dl>
<h1><a class="anchor" id="camera"></a>
Camera Pan/Tilt/Zoom Controls</h1>
<p>The list of cameras is provided by <a class="el" href="classArServerHandlerCameraCollection.html" title="Provides information to a client about different cameras and how to send requests to their different ...">ArServerHandlerCameraCollection</a> on the server. Control of each camera is provided by an <a class="el" href="classArServerHandlerCamera.html" title="Accepts and processes camera pan/tilt/zoom requests from the client, and provides information about t...">ArServerHandlerCamera</a> for each camera.</p>
<p>(A general purpose Pan/tilt unit is also considered a "camera". It will ignore zoom control requests.)</p>
<p>For services that capture and provide video image data, see the ArVideo library. The ArVideo library also contains camera control implementations and examples for more types of cameras than just ARIA. </p><ul>
<li>
If installed here, go to <a href="../../ArVideo/docs/index.html">ArVideo API Reference</a> </li>
<li>
To download, visit <a href="http://robots.mobilerobots.com/wiki/ArVideo">http://robots.mobilerobots.com/wiki/ArVideo</a> </li>
</ul>
<h2><a class="anchor" id="camerarequests"></a>
Requests Received</h2>
<p>Some requests control individual cameras, identified by name. However, if a server only has one camera, and does not provide a list of cameras using ArServerHandlerCameraControl, then the <em>Name</em> will be omitted. </p><table class="doxtable">
<tr>
<th>Request </th><th>Arguments </th><th>Description  </th></tr>
<tr>
<td>getCameraList </td><td>none </td><td>Replies with a packet containing a 2-byte integer indicating the number of cameras. Then, for each camera: <ol>
<li>
camera name (string) </li>
<li>
camera type (string) </li>
<li>
camera name for user display (string) </li>
<li>
camera type for user display (string) </li>
<li>
<p class="startli">list of requests that can be sent for this camera, beginning with the 2-byte number of commands, then, for each command:</p>
<ol>
<li>
the generic descriptive name (string) </li>
<li>
the specific command request name (string) </li>
<li>
an appropriate frequency for making this request (4-byte integer) </li>
</ol>
<p></p>
<p class="endli"></p>
</li>
<li>
<p class="startli">list of parameters, beginning with the 2-byte number of parameters, then, for each parameter, the parameter definition/value (see <a class="el" href="classArClientArg.html" title="Small helper class for sending/receiving an ArConfigArg in an ArNetPacket. ">ArClientArg</a> for format). </p>
<p></p>
<p class="endli"></p>
</li>
</ol>
</td></tr>
<tr>
<td>setCameraParams </td><td>string: camera name; string: param name 1; (varies): param name 1; [additional parameter names and values...]; null string terminates list. </td><td>Replies by sending cameraParamUpdated message upon completion of changes.  </td></tr>
<tr>
<td>setCameraRel<em>Name</em> </td><td>double: pan amount; double: tilt amount; [double: zoom amount] </td><td>Command to pan and tilt the camera from the current position by the values given in the first two arguments. If a third argument is given, zoom from the current position. </td></tr>
<tr>
<td>setCameraAbs<em>Name</em> </td><td>double: pan position; double: tilt position; [double: zoom position] </td><td>Command to pan and tilt the camera to the absolute positions given by the first two arguments. If a third argument is given, set the zoom to that absolute position. </td></tr>
<tr>
<td>setCameraPct<em>Name</em> </td><td>double: pan position; double tilt position </td><td>Command to pan and tilt the camera to the given positions as percentage of their overall ranges. </td></tr>
<tr>
<td>getCameraData<em>Name</em> </td><td>none </td><td>Data request to get current pan and tilt values. Also get zoom value if available. </td></tr>
<tr>
<td>getCameraInfo<em>Name</em> </td><td>None </td><td>Data request to get pan and tilt ranges. Also gets the zoom range if available. </td></tr>
<tr>
<td>getCameraModeList<em>Name</em> </td><td>none </td><td>Gets the list of modes that camera with name <em>Name</em> supports. Replies with a message containing a list of mode names as strings, ending with an empty string (or end of packet is reached)  </td></tr>
<tr>
<td>setCameraMode<em>Name</em> </td><td>string: mode name </td><td><p class="starttd">change the camera mode of camera with name <em>Name</em> </p>
<p class="endtd"></p>
</td></tr>
</table>
<h2><a class="anchor" id="camerareplies"></a>
Packets Sent</h2>
<p>When a camera is added or a parameter changes, the server broadcasts the following packets to each client: </p><table class="doxtable">
<tr>
<td>cameraListUpdate </td><td>no arguments </td><td><p class="starttd">use getCameraList to get the new list.</p>
<p class="endtd"></p>
</td></tr>
<tr>
<td>cameraParamUpdated </td><td>Starts with camera name, then a list of parameter name and value (see <a class="el" href="classArClientArg.html" title="Small helper class for sending/receiving an ArConfigArg in an ArNetPacket. ">ArClientArg</a> for format). An empty parameter name string terminates the list. </td><td></td></tr>
<tr>
<td>getCameraModeUpdated<em>Name</em> </td><td>none </td><td>Sent when the mode is changed of the camera with name <em>Name</em> </td></tr>
</table>
<p>Note that the cameraParamUpdated is currently only sent in response to a setCameraParams request. That is, it does not monitor the actual parameter values in the <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArCameraCollection.html">ArCameraCollection</a>.</p>
<h1><a class="anchor" id="config"></a>
Application Configuration</h1>
<p>A server can provide remote clients with access to the server's <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArConfig.html">ArConfig</a> configuration. This is implemneted on the server by <a class="el" href="classArServerHandlerConfig.html" title="Class for sending and receiving ArConfig data via ArNetworking. ">ArServerHandlerConfig</a>. You may use <a class="el" href="classArClientHandlerConfig.html" title="Client handler for receiving and updating ArConfig data via ArNetworking. ">ArClientHandlerConfig</a> on a client to download the server configuration to a local <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArConfig.html">ArConfig</a> object, modify the configuration, and send it back to the server.</p>
<h1><a class="anchor" id="map"></a>
Map Data</h1>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArServerHandlerMap.html" title="Service providing the contents of a map file to the client. ">ArServerHandlerMap</a></dd></dl>
<p>A remote client can download all map data into an <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArMap.html">ArMap</a> object, or request a few specific aspects of the map such as goal names. This request is provided by <a class="el" href="classArServerHandlerMap.html" title="Service providing the contents of a map file to the client. ">ArServerHandlerMap</a> on a server, see its class documentation for more details.</p>
<table class="doxtable">
<tr>
<th>Request </th><th>Reply Packet(s)  </th></tr>
<tr>
<td>getMapId </td><td>Map identifier string (null-terminated string); Map filename (null-terminated string); checksum (length-prefixed string); map size (4-byte unsigned integer); timestamp (4-byte signed integer)  </td></tr>
<tr>
<td>getMapName </td><td>Null-terminated map filename string  </td></tr>
<tr>
<td>getGoals </td><td>Sequence of null-terminated strings with goal object names from the map  </td></tr>
<tr>
<td>getMap </td><td>Replies with multiple <code>getMap</code> packets, each containing a line of text from the map file, terminated by an empty <code>getMap</code> packet.  </td></tr>
<tr>
<td>getMapBinary </td><td>Like <code>getMap</code> but the LINES and DATA sections are encoded as more compact sequences of 16-bit integers (multiple per packet).  </td></tr>
</table>
<p>The following packet types will also be broadcast to all clients to indicate certain events:</p>
<p>mapUpdated goalsUpdated</p>
<p>The mapUpdated packet is sent to all connected clients whenever a new map is loaded or the map is changed. The packet contains no data; the new map can be downloaded using one of the above requests.</p>
<p>The goalsUpdated packet is sent to all connected clients whenever the list of Goal objects changes in the map or a new map is loaded. The packet contains no data; the new list of goals can be downloaded using getGoals, or by downloading the entire map.</p>
<h1><a class="anchor" id="mapscanning"></a>
Control Scanning for Making Maps</h1>
<p>ArServerMapping provides requests to begin and end scanning for a new map. Servers will use the <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLaserLogger.html">ArLaserLogger</a> utility from ARIA to collect laser scan data and save it to a file which can be downloaded and loaded into Mapper3 to process into a map. (Mapper3 is provided with the optional Laser Mapping and Navigation packages from MobileRobots.)</p>
<table class="doxtable">
<tr>
<th>Request </th><th>Arguments </th><th>Description  </th></tr>
<tr>
<td>mappingStart </td><td>string: name of map file </td><td>Begin scanning for a new map. A <code>mappingStart</code> reply is sent containing a status byte: 0 if scanning is sucessfully started, 1 if already scanning (scanning is continued), 2 on error.  </td></tr>
<tr>
<td>mappingEnd </td><td>none </td><td>Stop scanning. A <code>mappingEnd</code> reply is sent containing a status byte: 0 if scanning is stopped without error, 1 if not currently scanning, 2 on error saving, moving or renaming scan file.  </td></tr>
<tr>
<td>mappingStatus </td><td>none </td><td>Replies with a <code>mappingStatus</code> packet containing: string: name of current scan file if scanning, or empty string if not currently scanning. Deprecated in favor of <code>mappingStatusBroadcast</code>  </td></tr>
<tr>
<td>mappingStatusBroadcast </td><td>none </td><td>Request that the server send a <code>mappingStatusBroadcast</code> packet to all clients containing: string: name of scan file if currently scanning, or empty string if not currently scanning. </td></tr>
</table>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArServerHandlerMapping.html" title="Class that handles the starting, stopping, and status of mapping. ">ArServerHandlerMapping</a></dd></dl>
<h1><a class="anchor" id="files"></a>
File Upload, Download and Listing</h1>
<p>Services are provided on the server by objects with class names starting with "ArServer...", declared in <a class="el" href="ArServerFileUtils_8h.html">ArServerFileUtils.h</a>.</p>
<p>Interfaces for clients to communicate with the server are declared in ArClientFileUtils: Use <a class="el" href="classArClientFileToClient.html" title="Class for getting files from the server. ">ArClientFileToClient</a> to download files from the server to the client. Use <a class="el" href="classArClientFileFromClient.html" title="Class for putting files to the server. ">ArClientFileFromClient</a> to upload files to the server. Use <a class="el" href="classArClientFileLister.html" title="Class for getting file list information from the server. ">ArClientFileLister</a> to get listings of files on the server. Use <a class="el" href="classArClientDeleteFileOnServer.html" title="Class for deleting a file on the server. ">ArClientDeleteFileOnServer</a> to delete files on the server.</p>
<p>The top level directory is determined by the server and is mapped to some directory on the server host filesystem. Clients may not access files outside this containing directory.</p>
<h1><a class="anchor" id="commMonitor"></a>
Network Communications Monitoring</h1>
<p>The <a class="el" href="classArServerHandlerCommMonitor.html" title="Handler that enables the client to monitor communication to the robot server. ">ArServerHandlerCommMonitor</a> sends regular broadcasts to clients which can be used to verify stability or performance of network communications. See <a class="el" href="classArServerHandlerCommMonitor.html" title="Handler that enables the client to monitor communication to the robot server. ">ArServerHandlerCommMonitor</a> for details.</p>
<h1><a class="anchor" id="popups"></a>
Display Popup Windows in Client</h1>
<p>The server can request that clients display notifications dialogs to users using an <a class="el" href="classArServerHandlerPopup.html" title="Class for having generic popups appear in MobileEyes (created on the server) ">ArServerHandlerPopup</a> object. This will send the following to clients:</p>
<table class="doxtable">
<tr>
<th>Request </th><th>Fields </th><th><p class="starttd">Description </p>
<p class="endtd"></p>
</th></tr>
<tr>
<td>popupCreate </td><td>byte4: id; string: ?; string: title; string: message; byte: type (0 = neutral, 1 = information, 2 = warning, 3 = critical error, 4 = query); string: button 0 label or empty; string: button 1 label or empty; string: button 2 label or empty; byte: default button index; byte: escape button index </td><td><p class="starttd">Display a dialog </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td>popupClose </td><td>byte4: id; string: message </td><td><p class="starttd">Close a dialog </p>
<p class="endtd"></p>
</td></tr>
</table>
<p>Clients can send the following:</p>
<table class="doxtable">
<tr>
<th>Request </th><th>Arguments </th><th>Description  </th></tr>
<tr>
<td>popupClicked </td><td>byte4: dialog id; byte: button clicked  </td></tr>
<tr>
<td>popupList </td><td>none </td><td>Resend popupCreate requests for open dialogs.  </td></tr>
</table>
<h1><a class="anchor" id="drawings"></a>
Visualization Graphics</h1>
<p>To be overlayed on the map. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classArServerInfoDrawings.html" title="Service to provide clients with information about graphical figures to be displayed with the map...">ArServerInfoDrawings</a> for full description.</dd></dl>
<h1><a class="anchor" id="customcommands"></a>
Custom User Commands</h1>
<p>Simple commands to be displayed in a list or menu in remote user interface clients.</p>
<p>The <a class="el" href="classArServerSimpleServerCommands.html">ArServerSimpleServerCommands</a>, <a class="el" href="classArServerSimpleComUC.html" title="Class for sending commands to the microcontroller (uC) ">ArServerSimpleComUC</a>, <a class="el" href="classArServerSimpleComMovementLogging.html" title="Class for enabling or disabling logging of movement commands and data. ">ArServerSimpleComMovementLogging</a>, <a class="el" href="classArServerSimpleComLogRobotConfig.html" title="Request configuration from robot controller and log the result. ">ArServerSimpleComLogRobotConfig</a>, <a class="el" href="classArServerSimpleComLogActions.html" title="Log current ArRobot actions. ">ArServerSimpleComLogActions</a>, <a class="el" href="classArServerSimpleLogRobotDebugPackets.html" title="Class that logs a special debug packet from the robot. ">ArServerSimpleLogRobotDebugPackets</a>, and <a class="el" href="classArServerSimpleConnectionTester.html" title="Class for sending commands to the microcontroller (uC) ">ArServerSimpleConnectionTester</a>, implement various simple commands used for debugging software and the robot itself.</p>
<p>You can add your own additional commands through <a class="el" href="classArServerHandlerCommands.html" title="Class for having commands that can be called easily on the client. ">ArServerHandlerCommands</a>.</p>
<h1><a class="anchor" id="auth"></a>
Basic User Authentication</h1>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArServerUserInfo.html" title="This class holds information about users and loads it from a file. ">ArServerUserInfo</a></dd></dl>
<h1><a class="anchor" id="ARNL"></a>
ARNL and MOGS Autonomous Navigation, Go To Goal Commands</h1>
<p>For more details on autonomous navigation and localization with ARNL or MOGS, see the BaseArnl, ARNL and MOGS reference manuals:</p>
<ul>
<li>
If installed here, go to: <ul>
<li>
<a href="../../../Arnl/docs/BaseArnl-Reference/index.html">BaseArnl API Reference</a> </li>
<li>
<a href="../../../Arnl/docs/ARNL-Reference/index.html">ARNL API Reference</a> </li>
<li>
<a href="../../../Arnl/docs/MOGS-Reference/index.html">MOGS API Reference</a> </li>
</ul>
</li>
<li>
To download, visit <a href="http://robots.mobilerobots.com/wiki/ARNL">http://robots.mobilerobots.com/wiki/ARNL</a> </li>
</ul>
<p>The following are the most commonly used requests used with ARNL. See the ARNL documentation and examples for more.</p>
<table class="doxtable">
<tr>
<th>Request </th><th>Arguments </th><th>Description  </th></tr>
<tr>
<td>tourGoals </td><td>none </td><td>Activate Tour Goals mode, if available on the server  </td></tr>
<tr>
<td>gotoGoal </td><td>goal name (string) </td><td>Activate Goto Goal mode and request that ARNL navigate to the named goal  </td></tr>
<tr>
<td>gotoPose </td><td>X (4-byte integer), Y (4-byte int), Theta (optional 2-byte int) </td><td>Activate Goal Mode and request ARNL navigate to the specified position in the map.  </td></tr>
<tr>
<td>dock </td><td>none </td><td>Activate Docking mode and send the robot to the docking station based on map and relevant configuration parameters  </td></tr>
<tr>
<td>home </td><td>none </td><td>Activate Goal mode and send the robot to the Home point in the map (if any)  </td></tr>
<tr>
<td>localizeToPose </td><td>X (4-byte int), Y (4-byte int), Theta (4-byte int) </td><td>Initialize ARNL laser localization at the given point int the map. Check status, <code>getLocState</code> reply and localization score for results. </td></tr>
<tr>
<td>getLocState </td><td>none </td><td>Return details of localization status: state (unsigned byte, see ArBaseLocalizationTask::LocalizationState); localization score (2-byte unsigned integer 0..100)  </td></tr>
<tr>
<td>pathPlannerStatus </td><td>none </td><td>Reply with path planning status string  </td></tr>
<tr>
<td>getGoals </td><td>none </td><td>Reply with list of goal names (null-terminated strings)  </td></tr>
<tr>
<td>goalName </td><td>none </td><td>Reply with current goal name  </td></tr>
<tr>
<td>getPath </td><td>none </td><td>Reply with points representing planned path if any  </td></tr>
<tr>
<td>dockInfo </td><td>none </td><td>Reply with details about docking state  </td></tr>
</table>
<p>When goal mode is activated, then the status and mode strings will indicate the status of navigation. (See <a class="el" href="RemoteRequestAPI.html#gotopointmode">Goal Mode (Navigation with ARNL/MOGS only)</a>.)</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="RemoteRequestAPI.html#gotopointmode">Goal Mode (Navigation with ARNL/MOGS only)</a> </dd>
<dd>
<a class="el" href="RemoteRequestAPI.html#map">Map Data</a> </dd></dl>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
